          <div class="sec3" style="margin-bottom:10px;">
          <div class="news">
       	  <div class="r" style="float:right; width:670px;background-color:#F3FEDA;">
            	<div class="box4">
                	<div class="bhead"><h2 id="h2-3"><span style="background:url(<?=base_url()?>assets/css/theme3/h2-3.gif) no-repeat 0 3px;; text-indent:-9999px; display:block;">ข่าวสารวัดศาลา</span></h2></div>
                    <div class="inner" style="background:#FFFFFF">
<?php
    if(count($r)==0)
    {
        echo "---ไม่พบข้อมูลที่ต้องการ---";
    }
    else
    {
//        echo "data<BR>";
        $no=1;
        foreach($r as $data)
        {
//            echo 
//                   $no." , ".
//                   $data ["id_new"]." , ".
//                   $data["id_temple"]." , ".
//                   $data["headnews"]." , ".
//                   $data["detail"]." , ".
//                   $data["pic_news"]." , ".
//                   $data["date"]." , ".
//                   $data["linkurl"]."<BR>";
    ?>
                   	  <ul class="newslst">
                    	   <li>
                            <div class="headnews">
                                <a href="<?=site_url()?>/template_u/news/readnews/<?=$data ["id_new"]?>">หัวข้อ: <?= $data["headnews"]?></a><br>
                                <a href="<?=base_url()?>assets/images/news/<?=$data["pic_news"]?>"><img src="<?=base_url()?>assets/images/news/<?=$data["pic_news"]?>" width="150" height="100" /></a><br>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?= $data["detail"]?>
                                <p class="postby">
                                        LinkUrl: <a href="<?=$data['linkurl']?>"><?if($data['linkurl']!=''){echo $data['linkurl'];}else{echo "-";}?></a><?echo " , ".$data['date'];?></p>
                          </div>
                            </li>
                        </ul>
<?php
            $no++;if($no>10)break;
        }
        
    }
    
//////////////////////////////////////////////////////////////////////
?>

                        <div class="more"><a href="<?=site_url()?>/template_u/news/index">แสดงข่าวสารทั้งหมด</a></div>
                  </div>
            </div>
            <div class="bfoot"><div></div></div>
            </div>
          </div>
            <div class="clear"></div>
          </div>              